<!-- 顶部导航 -->
<div class="navbar navbar-fixed-top main-nav" role="navigation">
    <div class="container">
        <!-- 全局消息 -->
        <p-toast position="top-center"></p-toast>
        <div class="navbar-header">
            <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-responsive-collapse"
                (click)="onMenuToggle()">
                <span class="sr-only">Toggle Navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a routerLink="posts" class="navbar-brand-my">
                <img src="assets/imgs/nice-fish.png" width="45">
            </a>
        </div>
        <div class="navbar-collapse collapse" [ngClass]="{'in':showToggleMenu===true}">
            <ul class="nav navbar-nav" (click)="onMenuToggle()">
                <li routerLinkActive="active">
                    <a routerLink="posts">{{'app.read' | translate}}</a>
                </li>
                <li routerLinkActive="active">
                    <a routerLink="post/write">{{'app.write' | translate}}</a>
                </li>
            </ul>
            <ul *ngIf="!currentUser?.userName" class="nav navbar-nav navbar-right" (click)="onMenuToggle()">
                <li routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
                    <a routerLink="login"><i class="fa fa-sign-in"></i></a>
                </li>
                <li routerLinkActive="active">
                    <a routerLink="register"><i class="fa fa-user-plus"></i></a>
                </li>
            </ul>
            <ul *ngIf="currentUser?.userName" class="nav navbar-nav navbar-right" (click)="onMenuToggle()">
                <li routerLinkActive="active">
                    <a routerLink="home"><i class="fa fa-user"></i></a>
                </li>
                <li routerLinkActive="active">
                    <a routerLink="manage"><i class="fa fa-cog"></i></a>
                </li>
                <li routerLinkActive="active">
                    <a href="javascript:void(0);" (click)="doLogout()"><i class="fa fa-sign-out"></i></a>
                </li>
            </ul>
        </div>
    </div>
</div>
<!-- 主体内容区域 -->
<div class="container main-container">
    <router-outlet></router-outlet>
</div>
<!-- 底部区域 -->
<div class="footer bs-footer">
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <p>
                    Powered by <a href="http://git.oschina.net/mumu-osc/NiceFish" target="_blank">NiceFish</a>
                </p>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <a href='https://gitee.com/mumu-osc/NiceFish/stargazers' target="_blank">
                    <img src='https://gitee.com/mumu-osc/NiceFish/badge/star.svg?theme=dark' alt='star' />
                </a>
            </div>
        </div>
    </div>
</div>
